<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">
	
	<f:view >
	<div align="left" >
		<h:graphicImage style="margin-left: 107px;" width="125" height="60" value="/imagens/logo_login.png"  />
		  <hr />
	</div>

		<s:div id="conteudoRelatorio" >
			<ui:repeat value="#{alunos}" var="_aluno">
				<rich:dataTable value="#{_aluno.turmasAsList}" var="_turma" width="80%" align="center" id="topicosGrid" >
				
					 <f:facet name="header" >
							<rich:columnGroup >
								<rich:column colspan="3" style="background:#D2D2D2;font-family: Tahoma;">
										#{_aluno.nome}
								</rich:column>						
							</rich:columnGroup>
					</f:facet>
					<rich:column breakBefore="true" style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:50px">
						Turma:
					</rich:column>
					<rich:column colspan="2" style="text-align:left;font-weight: normal;background:#FFFFFF">
						#{_turma.nome}
					</rich:column>
					
					<rich:column breakBefore="true" style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:50px"/>
					<rich:column  style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:50px">
						Frequência:
					</rich:column>
					<rich:column style="text-align:left;font-weight: normal;background:#FFFFFF">
						#{_turma.quantidadeAulas} - Aulas<br/>
						#{_aluno.getFaltas(_turma).get("faltas") } - Faltas<br/>
						#{_aluno.getFaltas(_turma).get("percentual")}% - Frequência
					</rich:column>
						<rich:column breakBefore="true" style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:50px"/>
						<rich:column  style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:100px">
							Últimas Avaliações:
						</rich:column>
						<rich:column style="text-align:left;font-weight: normal;background:#FFFFFF">
							<a4j:repeat value="#{_aluno.getUltimasAvaliacoes(_turma)}" var="_avaliacao">
								#{_avaliacao.psicogenese.grupo.nome} - #{_avaliacao.psicogenese.codigo}<br />
							</a4j:repeat>
						</rich:column>	
						
						
						<rich:column breakBefore="true" style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:50px"/>
						<rich:column  style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:100px">
							Evasões:
						</rich:column>
						<rich:column style="text-align:left;font-weight: normal;background:#FFFFFF">
							<a4j:repeat value="#{_aluno.getEvasoes(_turma)}" var="_evasao">
							  #{_evasao.motivo.grupo.nome} - #{_evasao.motivo.nome}<br />
							</a4j:repeat>
						</rich:column>
						
						<rich:column breakBefore="true" style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:50px"/>
						<rich:column  style="text-align:left;background:#FFFFFF;font-family: Tahoma;width:100px">
							Destinos:
						</rich:column>
						<rich:column style="text-align:left;font-weight: normal;background:#FFFFFF">
							<a4j:repeat value="#{_aluno.getDestinos(_turma)}" var="_destino">
								#{_destino.motivo.grupo.nome} - #{_destino.motivo.nome}<br />
							</a4j:repeat>
						</rich:column>
									
				</rich:dataTable>	
				<br />
				</ui:repeat>
			
		</s:div>
		</f:view>
</ui:composition>